<?php

    $con=mysqli_connect('localhost','root','root','test');
    //var_dump($con);
    if($con){
        mysqli_query($con,'set name utf8');
        $sql='insert into login(username,password) values("ooo","456")';
        $res=mysqli_query($con,$sql);
        var_dump($res);

    }else{
        echo '连接数据库失败';
    }

?>